<template>
    <div>
        <slot>
            <ul class="foot">
      <li v-for="item in list" :key="item.name">
        <router-link :to="item.path">
          <img :src="item.img" class="img-b" />
          <img :src="item.imgurl" class="img-t" />
          <span>{{ item.name }}</span>
        </router-link>
      </li>
    </ul>
        </slot>
    </div>
</template>
<script>
export default {
    data() {
        return {
             list: [
        {
          name: "电影",
          img: require("../assets/movie_icon2.png"),
          imgurl: require("../assets/movie_icon.png"),
          path: "/dy",
        },
        {
          name: "订单",
          img: require("../assets/order.png"),
          imgurl: require('../assets/order_icon.png'),
          path: "/din",
        },
        {
          name: "我的",
          img: require("../assets/uder.png"),
          imgurl: require("../assets/uder_icon.png"),
          path: "/wo",
        },
      ],
        }
    }
}
</script>
<style lang="scss">
.foot {
  display: flex;
width: 100%;
    height: 6vh;
    background-color: #076FA2;
    position: fixed;
    bottom: 17%;
  li {
    margin-top: 5px;
    flex: 1;
    list-style: none;
    a {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      font-size: 16px;
      text-decoration: none;
        color: #fff;
      img {
        width: 25px;
      }
    }
    .img-t {
      display: none;
    }
    .img-b {
      display: block;
    }
    .router-link-exact-active {
      color: #ff9900;
      .img-t {
        display: block;
      }
      .img-b {
        display: none;
      }
    }
  }
}
</style>